load("@rules_java//java:defs.bzl", "java_binary")
load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")

licenses(["notice"])

package(
    default_visibility = ["//visibility:public"],
)

kt_jvm_library(
    name = "generator",
    srcs = glob(["*.kt"]),
    deps = [
        "//compiler/src/main/java/io/grpc/kotlin/generator/protoc",
        "//stub/src/main/java/io/grpc/kotlin:context",
        "//stub/src/main/java/io/grpc/kotlin:stub",
        "@grpc-java//core",
        "@grpc_kotlin_maven//:com_google_guava_guava",
        "@grpc_kotlin_maven//:com_squareup_kotlinpoet",
        "@grpc_kotlin_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core",
        "@protobuf//:protobuf_java",
    ],
)

java_binary(
    name = "GeneratorRunner",
    main_class = "io.grpc.kotlin.generator.GeneratorRunner",
    runtime_deps = [":generator"],
)
